<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<form action="/enrollandpay/user/save" id="userForm">
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal"
            aria-hidden="true">&times;</button>
    <h4 class="modal-title" id="myModalLabel">修改账户</h4>
</div>
<div class="modal-body">
    <!--弹出框样式-->
    <style>
        ul, li {
            list-style: none;
        }
    </style>
    <!--弹出框样式end-->
    <ul>
        <input type="hidden" name="id" value="${thisUser.id}">
        <input type="hidden" name="token" value="${token}">
        <li class="row">
            <div class="col-sm-2" style="padding: 0.2em 0">*用户名：</div>
            <div>
                <input type="text" name="userName" value="${thisUser.userName}" class="col-sm-8 col-edituser-required col-edituser-data"
                       style="padding: 0.2em 0.5em;">
            </div>
        </li>
        <li class="row">
            <div class="col-sm-2" style="padding: 0.2em 0">*密码：</div>
            <div>
                <input type="text" name="password" value="${thisUser.password}" class="col-sm-8 col-edituser-required col-edituser-data"
                       style="padding: 0.2em 0.5em;">
            </div>
        </li>
        <li class="row">
            <div class="col-sm-2 " style="padding: 0.2em 0">*类型：</div>
            <select	name="userType" class="col-edituser-required col-edituser-data">
                <option value="0" ${thisUser.userType eq '0' ? "selected=selected":""} class="updOption" >超级管理员</option>
                <option value="1" ${thisUser.userType eq '1' ? "selected=selected":""} class="updOption">学校管理员</option>
            </select>
        </li>
        <li class="row">
            <div class="col-sm-2" style="padding: 0.2em 0">学校：</div>
            <select name=schoolId>
                <c:forEach items="${school}" var="c">
                    <option value="${c.id }" ${thisUser.schoolId eq c.id ? "selected=selected":""}>${c.name }</option>
                </c:forEach>
            </select>
        </li>

        <li class="row">
            <div class="col-sm-2" style="padding: 0.2em 0">备注：</div>
            <div>
                <input type="text" name="note" value="${thisUser.note}" class="col-sm-8 col-edituser-data"
                       style="padding: 0.2em 0.5em;">
            </div>
        </li>
    </ul>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
    </button>
    <button type="button"
            class="btn btn-primary " onclick="doSave('user')">保存</button>
</div>
</div>
</form>
